home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pcmagwin.zip / WINTIDY.DOC < prev    next >
Text File  |  1992-12-08  |  8KB  |  135 lines

  1. WINTIDY.EXE  (Version 1.0)        Copyright (c) 1992 by Neil J. Rubenking
  2. -------------------------------------------------------------------------
  3.               First Published in PC Magazine January 12, 1993 (Utilities)
  4. -------------------------------------------------------------------------
  5.  
  6. WINTIDY:
  7.  
  8.        WINTIDY is a Windows 3.1 specific utility that lets you keep your
  9. Program Manager organized. WINTIDY can arrange the icons in every group
  10. window. In addition, it can save the ProgMan layout, including iconic
  11. location, normal window size, and display state (minimized, maximized,
  12. or normal) for each group window, along with the location of the items
  13. within each group window.  If you experiment with a new layout, at the
  14. click of a button, WIN~TIDY will restore the ProgMan layout you last saved.
  15.  
  16.        WINTIDY requires  Windows 3.1, because some of the necessary
  17. programming functions were not introduced prior to that version. (Windows
  18. programmers will be amazed at the contortions this apparently simple
  19. program must go through behind the scenes.)  And, of course, if you use
  20. a program other than Program Manager as your Windows shell, WINTIDY
  21. can't help you.
  22.  
  23.        If you want to work from the source code, you'll need Borland
  24. Pascal 7.0 or Turbo Pascal for Windows (TPW) 1.5 to compile the program.
  25.  
  26. USING WINTIDY
  27.  
  28.        To install the program, simply copy WINTIDY.EXE into your utilities
  29. directory. If you wish, you can also copy the supplied WINTIDY.INI file
  30. into your Windows directory. (WINTIDY will create an .INI file there if
  31. it doesn't find one.) Then simply use the New command from ProgMan's File
  32. menu to install WINTIDY in the group of your choice.
  33.  
  34.        WINTIDY's main menu consists of three items:  File, Action, and
  35. Help. The File menu contains nothing but the standard Exit command, and
  36. the Help menu's two items display an About box and a brief explanation
  37. of how to use WINTIDY. You'll find Save Layout, Restore Layout, and
  38. Arrange Icons in the program's Action menu.
  39.  
  40.        The first time you use WINTIDY, you'll probably want to start by
  41. selecting the Arrange Icons command. When you do so, the Program Manager
  42. will disappear for a moment and will then reappear with all of its group
  43. windows closed and all the group icons lined up in rows. If you now Open
  44. any group window, you'll find the icons inside will be nicely arranged
  45. in rows and columns.
  46.  
  47.        From this orderly starting point, you can move the group window
  48. icons into an arrangement that makes sense to you. I like to put the
  49. group window icons along the top and left edges of the ProgMan window,
  50. leaving a large blank rectangular area. I can then open each group window
  51. and position it so it fits in that blank area. Your own preferred layout
  52. may differ, of course. After placing the group icons, open each group
  53. window, adjust its size and position, and locate the icons within the
  54. window to suit yourself. If one of the items in the group is used more
  55. than the others, you'll probably want to put it in the top left corner
  56. or in some other distinctive position.
  57.  
  58.        When you've created the desired ProgMan layout, choose WINTIDY's
  59. Save Layout command. After a moment, WINTIDY should report success, and
  60. you'll find that it has created the file WINTIDY.INI in your Windows
  61. directory. This file follows the standard .INI format and so will serve
  62. as an easily readable record of your layout. I don't recommend that you
  63. edit this .INI file, however, for a mistake could render one of your
  64. groups or icons invisible.
  65.  
  66.        Now, when hours or days of using ProgMan have made a muddle of
  67. your layout, just choose the Restore Layout command from the WINTIDY
  68. Action menu. Program Manager will disappear briefly, then reappear with
  69. everything arranged just as it was when you last saved the layout.
  70.  
  71.        I should note that since WINTIDY must modify ProgMan's .GRP files
  72. when it restores a layout, a minor risk is involved. If something were
  73. to prevent WINTIDY from completing the modification, the binary .GRP
  74. file could be damaged, rendering the corresponding group inaccessible.
  75. The same thing would be true if, for example, the power failed while
  76. ProgMan itself was writing to a .GRP file. I suggest, therefore, that
  77. you copy your .GRP files to a backup directory right now and update
  78. your backup copies regularly.
  79.  
  80.        WINTIDY obviously can't restore a group you have added since the
  81. last time you saved the layout. If the program encounters a new group
  82. during the restore process, it will report that fact in a message box.
  83. My suggestion for maintaining an orderly ProgMan window while adding new
  84. groups or program items would be to
  85.  
  86.        use WINTIDY to restore the saved layout,
  87.  
  88.        add the new program item or group and place it so as to fit
  89.        into your layout, and then
  90.  
  91.        use WINTIDY to save the modified layout.
  92.  
  93.        Keeping a single ProgMan layout isn't always enough.  You might,
  94. for example, want to use one layout with 1,024-by-768 resolution and
  95. another for 640-by-480. And you may want to keep an existing layout safe
  96. while experimenting with a new one.  WINTIDY lets you do so simply by
  97. running it with an alternate .INI filename on its command line. Note
  98. that when you do this WINTIDY pays attention to the filename portion
  99. only; the utility supplies its own .INI extension. Thus, if you were
  100. to put C:\DOS\SNAFU.DAT on the command line, WINTIDY would interpret
  101. this as a request to use the file SNAFU.INI in the Windows directory.
  102.  
  103.        When WINTIDY works with a layout file other than the default
  104. WINTIDY.INI, it appends the layout name to its title line. You can even
  105. compare layouts by running multiple copies of WINTIDY at once, each with
  106. its own layout file. Just select the Restore Layout command from each in
  107. turn to experiment with different layouts.
  108.  
  109. WINTIDY LAYOUT FILE STRUCTURE
  110.        I chose the .INI file format for saving WINTIDY's layout data
  111. because so much of that data consists of variable length text strings.
  112. Besides, Windows itself has built-in support for .INI files, which
  113. simplifies the process of reading and writing the data. A WINTIDY.INI
  114. file always contains two sections:  [Groups] and [Progman.Itself].
  115. Each key in the [Groups] section is the name of a ProgMan group, and the
  116. key's value is a string of ten numbers that define a TWindowPlacement
  117. data structure for the group window. The [Progman.Itself] section has
  118. a single key, Placement, again with a value consisting of ten numbers.
  119. This value defines ProgMan's own placement.
  120.  
  121.     Every key in the [Groups] section is also the name of a section that
  122. holds information about that group. Each key in the latter sections is
  123. the name of a program item within the group, the key's value being the
  124. location of the item in the group window.
  125.  
  126.        WINTIDY will behave a bit oddly in the rare event that you make a
  127. group that contains two program items with precisely the same name.
  128. Windows doesn't allow two keys with the same name in one section of an
  129. .INI file; the second simply overwrites the first.  Even apart from this
  130. restriction, it's never a good idea to give the exact same name to
  131. different program items.  If you do, however, and if you then save and
  132. restore the layout, WINTIDY will place the second item directly on top
  133. of the first!
  134. ------------------------------------------------------------------------
  135. NEIL J. RUBENKING IS TECHNICAL EDITOR OF PC MAGAZINE.